/**
 * Main.java created by zhangzhidong 
 * at 下午8:11:10 2016年9月10日
 */
package algorithm;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @author zhangzhidong<br>
 * comment generated at 2016年9月10日下午8:11:10<br>
 * 
 */
//句柄
class Handle{
	public static int seq = 0;
	int beginIndex = -1;
	int endIndex = -1;
	public int getSize(){
		return beginIndex - endIndex;
	}
	public String toString(){
		return ""+(seq++);
	}
	
}
class Mem{
	byte []  mem ;
	int begin = 0;
	int end = 0;
	
	List<Handle> list = new ArrayList<Handle>(10);
	public Mem(int size){
		mem = new byte[size];
	}
	
	public void print(Handle h){
		System.out.println(h);
	}
	public Handle _new(int size){
		Handle h = new Handle();
		list.add(h);
		h.beginIndex = begin;
		this.end += size;
		h.endIndex = end;
		print(h);
		return h;
	}
	public Handle del(Handle h){
		int size = h.getSize();
		begin += size;
		return h;
	}
	public void def(){
		
	}
}
public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub

//		Mem m = new Mem(10);
//		Handle h1 = m._new(5);
//		Handle h2 = m._new(3);
//		main(args);
//		HashMap<String,String> map = new HashMap<>();
//		map.put("aaa", null);
//		map.put(null, "aa");
//		System.out.println(map.get("aaa"));
		
 String str1 = "hello";
 String str2 = "he"+new String("llo");
 System.out.println(str1==str2);

		return  ;

	}
	public static int fun(int m,int n){
		if(m<=0||m<=0){
			return 0;
		}
		if(n==1) return m;
		if(m==1) return n;
		return fun(n-1,m) + fun(n,m-1);
	}

}
